#pragma once

#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#define INVALID_FD INVALID_SOCKET
#define Errno WSAGetLastError()
#else
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include <fcntl.h>
#define INVALID_FD -1
#define Errno errno
#define SOCKET int
#endif //_WIN32


namespace nio {

	enum  class SocketFamily
	{
		inet = AF_INET,
		inet6 = AF_INET6
	};

	enum class SocketType
	{
		stream = SOCK_STREAM,
		dgram = SOCK_DGRAM,
		raw = SOCK_RAW,
		rdm = SOCK_RDM,
		seqpacket = SOCK_SEQPACKET,
	};

}

